<!doctype html>
<html ng-app="create_app">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="icon" href="./img/config.png">
    <!-- styles -->
    <link rel="stylesheet" type="text/css" href="vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/angular/angular-toastr-1.4.1.min.css">
    <link rel="stylesheet" type="text/css" href="vendor/select2/select2.min.css">
    <link rel="stylesheet" type="text/css" media='all' href="vendor/angular/loading-bar.min.css">
    <link rel="stylesheet" type="text/css" href="styles/common-style.css">

    <title>新建项目</title>
</head>

<body>

<apollonav></apollonav>
<div class="container-fluid apollo-container">

    <div class="row">
        <div class="col-md-8 col-md-offset-2">
            <div class="panel">
                <header class="panel-heading">
                    创建项目
                </header>

                <form class="form-horizontal panel-body" name="appForm" ng-controller="CreateAppController"
                      valdr-type="App"
                      ng-submit="create()">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <apollorequiredfield></apollorequiredfield>
                            部门</label>
                        <div class="col-sm-3">
                            <select id="organization">
                                <option></option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group" valdr-form-group>
                        <label class="col-sm-3 control-label">
                            <apollorequiredfield></apollorequiredfield>
                            应用Id</label>
                        <div class="col-sm-3">
                            <input type="text" class="form-control" name="appId" ng-model="app.appId">
                            <small>（应用唯一标识）</small>
                        </div>
                    </div>
                    <div class="form-group" valdr-form-group>
                        <label class="col-sm-3 control-label">
                            <apollorequiredfield></apollorequiredfield>
                            应用名称</label>
                        <div class="col-sm-5">
                            <input type="text" class="form-control" name="appName" ng-model="app.name">
                            <small>(建议格式 xx-yy-zz 例:apollo-server)</small>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">
                            <apollorequiredfield></apollorequiredfield>
                            应用负责人</label>
                        <div class="col-sm-6 J_ownerSelectorPanel">
                            <apollouserselector apollo-id="'ownerSelector'"></apollouserselector>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">项目管理员<br>

                        </label>
                        <div class="col-sm-9 J_adminSelectorPanel">

                            <apollomultipleuserselector apollo-id="'adminSelector'"></apollomultipleuserselector>
                            <br>
                            <small>(应用负责人默认具有项目管理员权限，</small>
                            <br>
                            <small>项目管理员可以创建Namespace和集群、分配用户权限)</small>

                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-3 col-sm-9">

                            <button type="submit" class="btn btn-primary"
                                    ng-disabled="appForm.$invalid || submitBtnDisabled">提交
                            </button>
                        </div>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>

<div ng-include="'views/common/footer.html'"></div>

<!--angular-->
<script src="vendor/angular/angular.min.js"></script>
<script src="vendor/angular/angular-resource.min.js"></script>
<script src="vendor/angular/angular-toastr-1.4.1.tpls.min.js"></script>
<script src="vendor/angular/loading-bar.min.js"></script>

<!-- jquery.js -->
<script src="vendor/jquery.min.js" type="text/javascript"></script>
<script src="vendor/select2/select2.min.js" type="text/javascript"></script>

<!-- bootstrap.js -->
<script src="vendor/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<!--valdr-->
<script src="vendor/valdr/valdr.min.js" type="text/javascript"></script>
<script src="vendor/valdr/valdr-message.min.js" type="text/javascript"></script>

<script type="application/javascript" src="scripts/app.js"></script>
<script type="application/javascript" src="scripts/services/AppService.js"></script>
<script type="application/javascript" src="scripts/services/EnvService.js"></script>
<script type="application/javascript" src="scripts/services/UserService.js"></script>
<script type="application/javascript" src="scripts/services/CommonService.js"></script>
<script type="application/javascript" src="scripts/services/PermissionService.js"></script>
<script type="application/javascript" src="scripts/services/OrganizationService.js"></script>

<script type="application/javascript" src="scripts/AppUtils.js"></script>
<script type="application/javascript" src="scripts/directive/directive.js"></script>
<script type="application/javascript" src="scripts/controller/AppController.js"></script>

<script src="scripts/valdr.js" type="text/javascript"></script>
</body>
</html>
